package com.ssuu.ssuusnow.project.manage.user_role.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ssuu.ssuusnow.project.manage.user.entity.User;
import com.ssuu.ssuusnow.project.manage.user.mapper.UserMapper;
import com.ssuu.ssuusnow.project.manage.user_role.entity.UserRole;
import com.ssuu.ssuusnow.project.manage.user_role.mapper.UserRoleMapper;
import com.ssuu.ssuusnow.project.manage.user_role.service.IUserRoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 用户 角色 服务实现类
 * </p>
 *
 * @author sun
 * @since 2023-06-14
 */
@Service
public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> implements IUserRoleService {

    @Resource
    UserRoleMapper userRoleMapper;
    @Override
    public List<UserRole> getList(Long userID) {
        QueryWrapper<UserRole> wrappers = new QueryWrapper<>();
        wrappers.eq("userID",userID);
        return userRoleMapper.selectList(wrappers);
    }
}
